package cn.jobstart.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;
import cn.jobstart.pubInter.exception.SkException;
import cn.jobstart.pubInter.IBaseService;
import cn.jobstart.pubInter.RestfulController;
import cn.jobstart.dto.SpiderMonitorDTO;
import cn.jobstart.dto.SpiderMonitorPageDTO;
import cn.jobstart.modelExt.SpiderMonitorExt;
import cn.jobstart.searchExt.SpiderMonitorSearchExt;
import cn.jobstart.service.ISpiderMonitorService;
import cn.jobstart.vo.SpiderMonitorDetailVO;
import cn.jobstart.vo.SpiderMonitorListVO;
import cn.jobstart.vo.SpiderMonitorDomainVO;
import cn.jobstart.vo.SpiderMonitorDetailDomainVO;
import cn.jobstart.export.SpiderMonitorDomainExport;
import cn.jobstart.controller.ApiManageController;
import org.springframework.validation.annotation.Validated;
import java.util.Set;
import java.util.HashSet;
import cn.jobstart.pubInter.exception.BusinessException;

/**
*    @author sunke
*    @Date 2023-09-20 10:25:36
*    @description SpiderMonitorController      爬虫监控
*/
@Api(tags = "管理系统-爬虫监控相关", description = "爬虫监控相关接口")
@RestController(value ="spiderMonitorRestfulController")
@RequestMapping("/spiderMonitor/")
@Validated
public class SpiderMonitorController extends ApiManageController<SpiderMonitorDTO,SpiderMonitorPageDTO,SpiderMonitorExt, SpiderMonitorSearchExt,SpiderMonitorDomainVO,SpiderMonitorDetailDomainVO,SpiderMonitorDetailVO,SpiderMonitorListVO,String> {

	@Resource(name = "spiderMonitorService")
	private ISpiderMonitorService spiderMonitorService;



	@Override
	public IBaseService<SpiderMonitorExt, SpiderMonitorSearchExt,String> getBaseService() throws SkException {
		return spiderMonitorService;
	}

	@Override
	public String getBaseRoute() {
		return "/spiderMonitor/";
	}

	/**
	* 当前模板名称
	* @return
	*/
	@Override
	public String getModelName(){
		return "爬虫监控";
	}

	@Override
	public Class exportExcelClass() {
		return SpiderMonitorDomainExport.class;
	}

	@Override
	public Set<String> totalMapSet() {
		Set totalMapSet=new HashSet();
		totalMapSet.add("count(spider_monitor.sm_id) as countNum");
		return totalMapSet;
	}


}